﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DomainDriver.DomainModeling.DomainModels;
using DomainDriver.DomainModeling.DomainObjects;
using DomainDriver.DomainModeling.Repositories;

namespace DomainDriver.DomainModeling.Events
{
    public delegate void AddingDomainObjectDelegate<KEY, KEYED_DOMAIN_OBJECT>(IRepository<KEY, KEYED_DOMAIN_OBJECT> sender, AddDomainObjectEventArgs<KEY, KEYED_DOMAIN_OBJECT> args)
        where KEYED_DOMAIN_OBJECT : IKeyedDomainObject<KEY, KEYED_DOMAIN_OBJECT>;
    public delegate void AddedDomainObjectDelegate<KEY, KEYED_DOMAIN_OBJECT>(IRepository<KEY, KEYED_DOMAIN_OBJECT> sender, AddDomainObjectEventArgs<KEY, KEYED_DOMAIN_OBJECT> args)
        where KEYED_DOMAIN_OBJECT : IKeyedDomainObject<KEY, KEYED_DOMAIN_OBJECT>;
    public delegate void RemovingDomainObjectDelegate<KEY, KEYED_DOMAIN_OBJECT>(IRepository<KEY, KEYED_DOMAIN_OBJECT> sender, RemoveDomainObjectEventArgs<KEY, KEYED_DOMAIN_OBJECT> args)
        where KEYED_DOMAIN_OBJECT : IKeyedDomainObject<KEY, KEYED_DOMAIN_OBJECT>;
    public delegate void RemovedDomainObjectDelegate<KEY, KEYED_DOMAIN_OBJECT>(IRepository<KEY, KEYED_DOMAIN_OBJECT> sender, RemoveDomainObjectEventArgs<KEY, KEYED_DOMAIN_OBJECT> args)
        where KEYED_DOMAIN_OBJECT : IKeyedDomainObject<KEY, KEYED_DOMAIN_OBJECT>;
    public delegate void UpdatingDomainObjectDelegate<KEY, KEYED_DOMAIN_OBJECT>(IRepository<KEY, KEYED_DOMAIN_OBJECT> sender, UpdateDomainObjectEventArgs<KEY, KEYED_DOMAIN_OBJECT> args)
        where KEYED_DOMAIN_OBJECT : IKeyedDomainObject<KEY, KEYED_DOMAIN_OBJECT>;
    public delegate void UpdatedDomainObjectDelegate<KEY, KEYED_DOMAIN_OBJECT>(IRepository<KEY, KEYED_DOMAIN_OBJECT> sender, UpdateDomainObjectEventArgs<KEY, KEYED_DOMAIN_OBJECT> args)
        where KEYED_DOMAIN_OBJECT : IKeyedDomainObject<KEY, KEYED_DOMAIN_OBJECT>;

    public delegate void ChangingDataSourceDelegate(IDomainModel sender, EventArgs args);
    public delegate void ChangedDataSourceDelegate(IDomainModel sender, EventArgs args);
}